#ifndef _FileBrowse_H_
#define _FileBrowse_H_

#include "common.h"

#include <vector>
#include "wiisprite.h"

#include "pointer.h"

#include <stdio.h>
#include <stdlib.h>

#include <string.h>

#include "TextRender.h"
#include "DrawableImage.h"

#include <wiiuse/wpad.h>

#include <ogcsys.h>
#include <gccore.h>
 
#include "file.h"

#include "highscores.h"

using namespace wsp;
using namespace Common;

class FileBrowse
{
	public:
		FileBrowse(HighScores* scr);
		~FileBrowse();
		
		void PopulateList();
		
		bool Update(Pointer* ptr, GameMode::Type gm = GameMode::STORY);
		void InsertFront(char* lvl);
		
		void Render(GameMode::Type gm);
		void ClearIndex();
		
		char* GetSelectedFile();
		int GetSelectedFileIndex();
		
		bool IsCancelled(){return _cancel;}
		
	private:
		int _selectedIndex;
		std::vector<std::string> _fileList;
		
		Sprite _bgSprite;
		Sprite _selectedSprite;
		
		DrawableImage* _textImage;
		DrawableImage* _textImage2;
		TextRender* _textRender;
		Sprite _textSprite;
		
		HighScores* _ptrHighScores;
		
		Image* _cubeFile;
		Image* _cubeScore;
		
		int _scroll;
		int _start_scroll;
		
		bool _cancel;
		
};

#endif //_FileBrowse_H_
